package iliasTests;

public class ArraySort
{
    static double[] arraySort(double[] a)
    {
        int i = 0;
        while (i < a.length - 1)
        {
            if (a[i] > a[i + 1])
            {
                double f = a[i + 1];
                a[i + 1] = a[i];
                a[i] = f;
                i = 0;
            }
            else
            {
                i++;
            }
        }
        return a;
    }

    public static void main(String[] args)
    {
        double[] a =
        { 1, 4, 3, 44, 99, 2, 3, 74, 22 };
        for (int i = 0; i < a.length; i++)
        {
            System.out.println(String.valueOf(a[i]));
        }
        a = arraySort(a);
        for (int i = 0; i < a.length; i++)
        {
            System.out.println(String.valueOf(a[i]));
        }
    }

}
